#ifndef TESTLOGPLUGINIMP_H
#define TESTLOGPLUGINIMP_H
#include "TestLogPlugin.h"
#include "ILoggingService.h"

/********************************************************************************
 * @name function TestLogPluginImp
 * @function description：
 * @param
 * @param
 * @param
 * @return
********************************************************************************/
class TestLogPluginImp : public IBundleActivator
{
public:  /******************************class init******************************/
    static TestLogPluginImp* Instance();

private:
    TestLogPluginImp();

    ~TestLogPluginImp();


public:  /******************************class API*******************************/
    virtual bool OSGI_API Start(IBundleContext* pBundleContext);

    virtual bool OSGI_API Stop(IBundleContext* pBundleContext);


public:  /******************************common funciton*************************/
    ILogger * Logger();


private:
    bool setServiceMnager(IBundleContext* pBundleContext);

    bool setBundleContext(IBundleContext* pBundleContext);

    bool setAllocator(IBundleContext* pBundleContext);

    bool setLogger(IBundleContext* pBundleContext);

    bool setHttpClient(IBundleContext* pBundleContext);

    bool setMonitorService(IBundleContext* pBundleContext);

    bool setDBService(IBundleContext* pBundleContext);


private:  /******************************data***********************************/
    static TestLogPluginImp * m_pInstance;
    IBundleContext* m_pBundCnt;
    IServiceManager* m_pServMgr;
    IAllocator* m_pAlloc;
    ILogger* m_pLogger;

    IMonitor* m_pMonitor;

    std::map<std::string, std::string> testData;

    std::map<std::string, std::string> testData1;

};

#endif // TESTLOGPLUGINIMP_H
